package org.lele.pdf;

public class DefaultPageSize {
    private Float pageWidth;
    private Float pageHeight;

    public static DefaultPageSizeBuilder builder() {
        return new DefaultPageSizeBuilder();
    }

    public Float getPageWidth() {
        return this.pageWidth;
    }

    public Float getPageHeight() {
        return this.pageHeight;
    }

    public void setPageWidth(final Float pageWidth) {
        this.pageWidth = pageWidth;
    }

    public void setPageHeight(final Float pageHeight) {
        this.pageHeight = pageHeight;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof DefaultPageSize)) {
            return false;
        } else {
            DefaultPageSize other = (DefaultPageSize)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$pageWidth = this.getPageWidth();
                Object other$pageWidth = other.getPageWidth();
                if (this$pageWidth == null) {
                    if (other$pageWidth != null) {
                        return false;
                    }
                } else if (!this$pageWidth.equals(other$pageWidth)) {
                    return false;
                }

                Object this$pageHeight = this.getPageHeight();
                Object other$pageHeight = other.getPageHeight();
                if (this$pageHeight == null) {
                    if (other$pageHeight != null) {
                        return false;
                    }
                } else if (!this$pageHeight.equals(other$pageHeight)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof DefaultPageSize;
    }

    public int hashCode() {
        //int PRIME = true;
        int result = 1;
        Object $pageWidth = this.getPageWidth();
         result = result * 59 + ($pageWidth == null ? 43 : $pageWidth.hashCode());
        Object $pageHeight = this.getPageHeight();
        result = result * 59 + ($pageHeight == null ? 43 : $pageHeight.hashCode());
        return result;
    }

    public String toString() {
        return "DefaultPageSize(pageWidth=" + this.getPageWidth() + ", pageHeight=" + this.getPageHeight() + ")";
    }

    public DefaultPageSize() {
    }

    public DefaultPageSize(final Float pageWidth, final Float pageHeight) {
        this.pageWidth = pageWidth;
        this.pageHeight = pageHeight;
    }

    public static class DefaultPageSizeBuilder {
        private Float pageWidth;
        private Float pageHeight;

        DefaultPageSizeBuilder() {
        }

        public DefaultPageSizeBuilder pageWidth(final Float pageWidth) {
            this.pageWidth = pageWidth;
            return this;
        }

        public DefaultPageSizeBuilder pageHeight(final Float pageHeight) {
            this.pageHeight = pageHeight;
            return this;
        }

        public DefaultPageSize build() {
            return new DefaultPageSize(this.pageWidth, this.pageHeight);
        }

        public String toString() {
            return "DefaultPageSize.DefaultPageSizeBuilder(pageWidth=" + this.pageWidth + ", pageHeight=" + this.pageHeight + ")";
        }
    }
}